<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>

<%@ include file="/core/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<%@ include file="/core/adminMeta.jsp"%>
		<script type="text/javascript">
			$(document).ready(function(){
				$(":submit").bind("click", function () {
						$("#commitForm").mask("数据提交中，请等待！");
				});
			});
			
		</script>
		<script type="text/javascript">
			
			function nameChange(){
				
				var loginName=$("#loginName").val(); 		
				 
				$.getJSON("<%=basePath%>/admin/wealth/ajaxGetMemberByName.shtml",{loginName: loginName},function(result){	 
					 
					//填入新值
					if(result.success==true){
						
						$("#personName").html("会员姓名:"+result.personName+"，级别："+result.title);
					}else{
						 
						$("#personName").html("<b  style='color: red;'>会员不存在</b>");
					} 
				});
				 
				
			}
			
			
			function fatherChange(){
				
				var fatherLoginName=$("#fatherLoginName").val(); 		
				 
				$.getJSON("<%=basePath%>/admin/member/ajaxGetFatherByName.shtml",{fatherLoginName: fatherLoginName},function(result){	 
					 
					//填入新值
					if(result.success==true){
						
						$("#fatherName").html("接点人姓名:"+result.personName+"，级别："+result.title);
					}else{
						 
						$("#fatherName").html("<b  style='color: red;'>该会员不是代理或不存在</b>");
					} 
				});
				 
				
			}
			
		</script>
		
		 
	</head>
	
	<body>
		<div id="scrollContent">
		
			<div class="box2" panelTitle="升级代理" roller="true">
	
<form id="commitForm" action="admin/member/levelSheng.shtml" method="post">

					<table class="tableStyle" formMode="true">
					
						<tr>
							<th colspan="2">升级代理</th>
						</tr>
					
						
						<tr>
							<td width="40%">会员账号：</td>
							<td>
								<input type="text"  id="loginName" name="loginName"   onchange="nameChange()" />
								<span id="personName"></span>
								
							</td>
						</tr>
						<tr>	 
												 
							<td align="right">
								接点人编号：
							</td>
							<td align="left">
								<input type="text" id="fatherLoginName" name="fatherLoginName" onchange="fatherChange()"  value="${fatherLoginName}"/>
								<span id="fatherName"></span>
							</td>
						</tr>
						<tr>		
							<td align="right">
								接点人位置：
							</td>
							<td align="left">
							<c:if test="${qu!=null&&qu!=''}">
								<c:if test="${qu==1}">
									<input type="radio" name="qu" value="1" checked="checked" />
									<label >
										接点人的左区
									</label>
									<input type="radio" name="qu" value="2"  />
									<label >
										接点人的右区
									</label>
								</c:if>
								<c:if test="${qu==2}">
									<input type="radio" name="qu" value="1" />
									<label >
										接点人的左区
									</label>
									<input type="radio" name="qu" value="2" checked="checked"  />
									<label >
										接点人的右区
									</label>
								</c:if>
							</c:if>
							<c:if test="${qu==null||qu==''}">
								<input type="radio" name="qu" value="1" checked="checked" />
								<label >
									接点人的左区
								</label>
								<input type="radio" name="qu" value="2"  />
								<label >
									接点人的右区
								</label>
							</c:if>
								
							</td>
							
						</tr> 
						
						<tr>
							<td>安全密码：</td>
							<td>
								<input type="password" id="myTwoPassword" name="myTwoPassword"/>
							</td>
						</tr>
						 
						<tr>
							<td colspan="2">
								<div style="color:red;text-align:center">
									 ${retMsg}
								</div>
							</td>
						</tr>
						
				
						<tr>
							<td colspan="2">
								<input type="submit" value=" 提 交 " style="width: 80px;height: 30px;font-size: 17px;font-weight: bold;"/>
								<input type="reset" value=" 重 置 " style="width: 80px;height: 30px;font-size: 17px;font-weight: bold;"/>
							</td>
						</tr>
				
						
					</table>

				</form>
				
				
			</div>
		</div>
	<!--代码高亮end-->
	</body>
</html>